<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title></title>
	<style>
		#box{
			width: 500px;
			height: 300px;
			border:1px solid gray;
			margin:auto;
			display: flex;
		}
		#box>div{
			width: 100px;
			height: 100px;
			border:1px solid red;
			/*flex-grow: 1;/*分配剩余空间*/
		/*	flex-shrink: 0;/*该元素不缩小*/
		/*flex-basis: 100px;/*分配躲雨空间前设置元素大小，但是不会超过父级的大小*/
		flex-basis: auto;
		}
	</style>
</head>
<body>
	<div id="box">
		<div >1</div>
		<div >2</div>
		<div >3</div>
		<div >4</div>
	</div>
</body>
</html>